﻿<Window x:Class="FFMPEG_MKV2MP4.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ffmpegMkv2Mp4="clr-namespace:FFMPEG_MKV2MP4"
        Title="MKV 2 MP4" Height="350" Width="700">
    
    <Window.DataContext>
        <ffmpegMkv2Mp4:MainWindowViewModel/>
    </Window.DataContext>
    
    <Window.Resources>
        <Style TargetType="TextBox">
            <Setter Property="FontSize" Value="16"/>
            <Setter Property="Height" Value="50"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
        </Style>
        <Style x:Key="BrowseButton" TargetType="Button">
            <Setter Property="Background" Value="Aquamarine"/>
            <Setter Property="FontSize" Value="18"/>
            <Setter Property="FontFamily" Value="Verdana"/>
            <Setter Property="ToolTip" Value="Click to browse to the appropriate file path"/>
        </Style>
    </Window.Resources>
    
    <Grid Background="AntiqueWhite">
        <Grid.RowDefinitions>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="2*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="2*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="2*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="2*"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="12*"/>
            <ColumnDefinition Width="3*"/>
            <ColumnDefinition Width="1*"/>
        </Grid.ColumnDefinitions>

        <Viewbox Grid.Row="0" Grid.Column="1">
            <TextBlock Text="Path to FFMPEG"/>
        </Viewbox>
        <Viewbox Grid.Row="1" Grid.Column="1" Stretch="Uniform">
            <TextBox  Text="{Binding PathToFFMPEG}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="500" ToolTip="This should point to the directory of the FFMPEG EXE"/>
        </Viewbox>
        <Button Grid.Row="1" Grid.Column="2" Content="Browse" Command="{Binding SetPathToFFMPEG}" Style="{StaticResource BrowseButton}"/>

        <Viewbox Grid.Row="2" Grid.Column="1">
            <TextBlock Text="Path to Source"/>
        </Viewbox>
        <Viewbox Grid.Row="3" Grid.Column="1">
            <TextBox  Text="{Binding PathToSource}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="500" ToolTip="This should point to the MKV you wish to convert"/>
        </Viewbox>
        <Button Grid.Row="3" Grid.Column="2" Content="Browse" Command="{Binding SetPathToSource}" Style="{StaticResource BrowseButton}"/>

        <Viewbox Grid.Row="4" Grid.Column="1">
            <TextBlock Text="Path to Destination"/>
        </Viewbox>
        <Viewbox Grid.Row="5" Grid.Column="1">
            <TextBox  Text="{Binding PathToDestination}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="500" ToolTip="This should point to the output MP4 file"/>
        </Viewbox>
        <Button Grid.Row="5" Grid.Column="2" Content="Browse" Command="{Binding SetPathToDestination}" Style="{StaticResource BrowseButton}"/>

        <Grid Grid.Row="7" Grid.Column="1" ColumnSpan="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>
            
            <Button Grid.Column="0" Grid.Row="0" Content="Exit" Command="{Binding ExitApplication}" FontSize="18" FontWeight="Black" Background="IndianRed" ToolTip="Click to exit the application"/>
            <Button Grid.Column="2" Grid.Row="0" Content="Convert" Command="{Binding StartConversion}" FontSize="18" FontWeight="Black" Background="CornflowerBlue" ToolTip="Click to begin conversion"/>
        </Grid>
    </Grid>
</Window>
